<link href="${rc.getContextPath()}/manage/css/dwzCustomCss/dwz.custom.css?v=${ver}" rel="stylesheet" type="text/css">

<div class="pageContent" id="jGridForWarehouse"></div>

<script type="text/javascript">
(function($){
    
    var flagFunction=function(data)
    {
        if (data == 0) {
            return '<@label    key="no.C">否</@label>';
        } else if (data == 1) {
            return '<@label    key="yes.C">是</@label>';
        }
    };
    var flagOption=[
         {value: '', label: '<@label key="all.C">所有</@label>'},
         {value: 0, label: '<@label key="no.C">否</@label>'},
         {value: 1, label: '<@label key="yes.C">是</@label>'}
        ];
    $('#jGridForWarehouse').jGrid({
        layoutH: 135,
        base: '${rc.getContextPath()}/manage/warehouse/',
        url: 'selectWarehouseList',
        columns: [
            {field: 'warehouseCode', group: 'ids', type: 'checkbox', width: 22},
            {field: '_index', text: '<@label key="serialNumber.C">序号</@label>', width: 40},
            {field: 'warehouseCode', text: '<@label key="WarehouseCode.C">仓库编号</@label>', width: 100, query: true},
            {field: 'warehouseText', text: '<@label key="WarehouseText.C">仓库描述</@label>', width: 100, query: true},
            {field: 'warehouseTypeCode', text: '<@label key="WarehouseTypeCode.C">仓库类型编号</@label>', width: 100, query: false,orderTable:'tt'},
            {field: 'warehouseTypeText', text: '<@label key="WarehouseTypeText.C">仓库类型描述</@label>', width    : 100, query: false ,orderTable:'tt'},
            {field: 'locationManageFlag', text: '<@label key="locationManageFlag.C">启用库位</@label>', width: 50, transform: flagFunction},
            {field: 'negativeInventoryFlag', text: '<@label key="negativeInventoryFlag.C">允许负库存</@label>', width: 50,orderTable:'t', transform: flagFunction},
            {field: 'lockFlag', text: '<@label key="lockFlag.C">锁定标记</@label>', width: 50,orderTable:'t', transform: flagFunction},
            {field: 'createUser', text: '<@label key="createUser.C">创建人</@label>', width: 100,orderTable:'t'},
            {field: 'createDateTime', type: 'date', format: 'yyyy-MM-dd HH:mm:ss', text: '<@label key="createDateTime.C">创建时间</@label>', width: 100,orderTable:'t', defaultOrder:'desc'},
            {field: 'modifyUser', text: '<@label key="modifyUser.C">修改人</@label>', width: 100,orderTable:'t'},
            {field: 'modifyDateTime', type: 'date', format: 'yyyy-MM-dd HH:mm:ss', text: '<@label key="modifyDateTime.C">修改时间</@label>', width: 100,orderTable:'t'}
        ],
        query: {
            advancedqueryfields: [
            {field: 'warehouseTypeCode', text: '<@label key="WarehouseTypeCode.C">仓库类型编号</@label>'},
            
            {field: 'warehouseTypeText', text: '<@label key="WarehouseTypeText.C">仓库类型描述</@label>'},
            
            {field: 'place', text: '<@label key="place.C">所在位置</@label>'},
            {field: 'locationManageFlag', text: '<@label key="locationManageFlag.C">启用库位</@label>', type: 'select', options: flagOption},
            {field: 'negativeInventoryFlag', text: '<@label key="negativeInventoryFlag.C">允许负库存</@label>', type: 'select', options:flagOption},
            {field: 'lockFlag', text: '<@label key="lockFlag.C">锁定标记</@label>', type: 'select', options:flagOption}
            ]
        },
        gridbars: [
            {icon: 'add', text: '<@label key="add.B">新增</@label>', title: '<@label key="addWarehouse.D">新增仓库类型</@label>', 
                target: 'dialog', href: 'addWarehouse', data: {navTabId: "${navTabId!''}"}, mask: true, width: 650, height: 190, rel: '', 
                menuCode: "Warehouse_add"},
            {icon: 'edit', text: '<@label key="edit.B">编辑</@label>', title: "<@label key='editWarehouse.D'>编辑仓库类型</@label>", 
                target: 'dialog', href: 'editWarehouse', data: {id: '{warehouseCode}', navTabId: '${navTabId!""}'}, mask: true, width: 650, height: 260, rel: '', callback: $.noop,
                menuCode: "Warehouse_edit"},
            {icon: 'icon', text: '<@label key="view.B">详情</@label>', title: "<@label key='viewWarehouse.D'>仓库类型详情</@label>", 
                target: 'dialog', href: 'viewWarehouse', data: {id: '{warehouseCode}', navTabId: '${navTabId!""}'}, mask: true, width: 650, height: 500, rel: '', callback: $.noop,
                menuCode: "Warehouse_view"},
            {icon: 'delete', text: '<@label key="delete.B">删除</@label>', title: "<@label key='confirmDelWarehouse.M'>确认要删除选择的仓库类型吗？</@label>", 
                target: 'selectedTodo', href: 'deleteWarehouse', data: {ids: '{ids}', navTabId: '${navTabId!""}'},
                menuCode: "Warehouse_del"}
        ]
    });
})(jQuery);
</script>